package com.qhs.sys.service;

import com.qhs.sys.constant.TreeView;
import com.qhs.sys.entity.SysMenuInfo;
import com.qhs.sys.vo.MenuVO;

import java.util.List;

/**
 * 菜单资源
 *
 * Created by xinchao on 2016/11/30 0030.
 */
public interface MenuService {


    int deleteByPrimaryKey(Long menuId);

    int insert(SysMenuInfo record);

    SysMenuInfo selectByPrimaryKey(Long menuId);

    int updateByPrimaryKeySelective(SysMenuInfo record);

    /**
     * 查询列表
     * @param sysMenuInfo
     * @return
     */
    List<SysMenuInfo> findMenuByWhere(SysMenuInfo sysMenuInfo);


    /**
     * 根据角色id 获取菜单
     * @param roleId
     * @return
     */
    List<TreeView> findMenuTree(Long roleId);

    List selectTopMenu();

    List<MenuVO> findMenuListByUserId(Long userId);

    List<SysMenuInfo> findResourceListByUserId(Long userId);
}
